package com.fzy.designpattern.singleton;

/**
 * 静态内部类实现方式 线程安全，访问效率高，懒加载
 *
 * @author 冯赵杨
 * @create 2018/9/14
 */
public class Singleton {
    private Singleton() {
    }

    private static class Instance {
        private static final Singleton INSTANCE = new Singleton();
    }

    public static Singleton getInstance() {
        return Instance.INSTANCE;
    }
}
